package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Permission;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface PermissionDao {
    public Set<Permission> findByRoleId(Integer roleId);

    public void add(Permission permission);

    public void setPermissionAndRole(Map<String, Integer> map);

    public Page<Permission> findByCondition(String queryString);

    public Permission findById(Integer id);

    public List<Integer> findRoleIdsByPermissionId(Integer permissionId);

    public void update(Permission permission);

    public void delPermissionAndRoleByPermissionId(Integer permissionId);

    public void delete(Integer id);

    List<Permission> findAll();
}
